<template>
    <div class="myfansfollows">
        <div class="flex-between">
            <div class="md_title flex-align">
                <img :src="item.avatar" alt="" />
                <div>
                    <div class="name flex-align">
                        <span class="mr6">{{ item.nickname }}</span>
                        <div class="level">Lv{{ item.level }}</div>
                    </div>
                    <div v-if="item.major_direction != ''" class="fz12 c999">
                        {{ item.major_direction }}
                    </div>
                </div>
            </div>
            <div class="focus" @click="click" :class="item.is_follow == 0 ? '' : 'followed'">
                {{ item.is_follow == 0 ? '关注' : '已关注' }}
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name: 'FansFollowsItem',
    props: {
        item: {
            type: Object,
            default: () => {
                return {}
            },
        },
    },
    data() {
        return {}
    },
    methods: {
        click() {
            this.$emit('click', this.item)
        },
    },
}
</script>

<style lang="scss" scoped>
@import url('@/assets/static/reset.css');

.myfansfollows {
    padding: 30px;
    .md_title {
        img {
            margin-right: 10px;
            width: 55px;
            height: 55px;
            border-radius: 50%;
            object-fit: cover;
        }

        .name {
            width: 300px;
            img {
                // margin-left: 6px;
                margin-right: 5px;
                width: 16px;
                height: 16px;
            }
            .level {
                cursor: pointer;
                text-align: center;
                width: 39px;
                height: 16px;
                line-height: 16px;
                background: linear-gradient(308deg, #a1c1e6 0%, #dfeeff 100%);
                border-radius: 67px;
                color: #fff;
                font-size: 12px;
            }
        }
    }
    .focus {
        cursor: pointer;
        text-align: center;
        // margin-left: 640px;
        line-height: 31px;
        width: 67px;
        height: 31px;
        background: #ffffff;
        border-radius: 4px;
        border: 1px solid #666666;
        color: #666666;
        font-size: 14px;
    }
    .followed {
        color: #1c87f3;
        border: 1px solid #1c87f3;
    }
}
</style>
